﻿/* ------------------------------------------------------------------------- */
/*
 * C O M P A N Y   P R O P R I E T A R Y
 * use or disclosure of data contained in this file is subject to the
 * requirements an the end of this file
 *
 * CLASSIFICATION: OFFEN / UNCLASSIFIED
 */
/* ------------------------------------------------------------------------- */

/* ######################################################################### */
/** \file M44_auxObjDynStr.cs
 *  \brief This file contains all the neccesary auxiliary structures needed to
 *         process the dynamic objets detection.
 * 
 * This file contains all the needed methods to create and modify the structures of the
 * dynamics object detection. 
 *
 * PROJEKT:   NETWORKED MULTI-ROBOT SYSTEMS
 *
 * Copyright (c) 2008 SENER - Universidad Politécnica de Madrid.
 *
 * \author    Antonio Matta \n
 *            Universidad Politécnica de Madrid \n
 *            Grupo de Robótica y Cibernética \n
 * \version   0.04
 * \date      2010-02-17
 *
 * \n \n
 * Versionshistory: \n
 * -----------------
 * - Version 0.01:   Antonio MATTA                          2009-07-15 \n
 *      First implementation of the DetectedObjects structure.
 *      
 * - Version 0.02:   Gonzalo RORDRIGUEZ                     2010-02-08 \n
 *      Change the iteration limits
 *      
 *- Version 0.03    Gonzalo RODRIGUEZ                       2010-02-16 \n
 * /    Added isMovement, AdditionalInfo, Backgroundreference and RobotObjectList Structure 
 *      in order to provide the necessary information for DynamicObjectdetection
 *      
 * - Version 0.04   Gonzalo RODRIGUEZ                       2010-02-17
 *      AdditionalInfo structure no longer needed
 * 
/* ######################################################################### */

/*Autogenerated*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Microsoft.Dss.Core.Attributes;

/*Using Interfaces classes*/
using Interfaces;
using Interfaces.Complex;
using Interfaces.Basis;

/* ------------------------------------------------------------------------- */
/**	\namespace NMRS.M44_SensorFusionAndMapping
 *
 *  \brief	This is the namespace of the M44 Sensor Fusion and Mapping module
 */
/* ------------------------------------------------------------------------- */
namespace NMRS.M44_SensorFusionAndMapping
{
    /* ------------------------------------------------------------------------- */
    /**	\struct RobotObjectList
     * 
     *  \brief Auxiliary structure for ObjectIdentification function. It stores the DynamicObjectList
     *          that is passed to the other modules and a object list with the information needed to 
     *          dynamic object detection
     *  
     */
    /* ------------------------------------------------------------------------- */
    public struct RobotObjectList
    {
        /* ##### INPUT VARIABLES ##### */
        public cl_DynamicObjects DynamicObjects;
        public ushort maxID;


        public RobotObjectList(short Nobjs)
        {

            DynamicObjects = new cl_DynamicObjects();
            maxID = 0;
        }
    }

    /* ------------------------------------------------------------------------- */
    /**	\struct BackgroundReference
     * 
     *  \brief Auxiliary structure where DetectedObjects coming from the M44_ObjectDetection
     *  function are saved.
     *  
     */
    /* ------------------------------------------------------------------------- */
    [DataContract]
    [DataMemberConstructor]
    public struct BackgroundReference
    {
        /* ##### INPUT VARIABLES ##### */
        public float[,] tf_Dref;
        public float[,] tf_Vref;

        public BackgroundReference(short Nrows, short Ncols)
        {
            tf_Dref = new float[Nrows, Ncols];
            tf_Vref = new float[Nrows, Ncols];
        }
    }

    /* ------------------------------------------------------------------------- */
    /**	\struct DetectedObjects
     * 
     *  \brief Auxiliary structure where DetectedObjects coming from the M44_ObjectDetection
     *  function are saved.
     *  
     */
    /* ------------------------------------------------------------------------- */
    public struct DetectedObjects
    {
        /* ##### INPUT VARIABLES ##### */
        public int[,] ti_Objects;
        /*i_NumberOfObjects -> MISSING*/
        public int i_NumberOfObjects;
        public ArrayList s_labels;
        public int i_status;
        
        public DetectedObjects(short Nrows, short Ncols)
        {

            ti_Objects = new int[Nrows, Ncols];
            i_NumberOfObjects = 0;
            i_status = 0;
            s_labels = new ArrayList();
        }
    }

    /* ------------------------------------------------------------------------- */
    /**	\struct isMovementStruct
     * 
     *  \brief structure where boolean variables are stored
     *  
     */
    /* ------------------------------------------------------------------------- */
    [DataContract]
    [DataMemberConstructor]
    public struct isMovementStruct
    {
        /* ##### INPUT VARIABLES ##### */
        public bool[,] tb_MovementMap_k;
        public bool[,] tb_MovementMap_k_1;
        public aux_MapCell MapCellMatrix_k;
        public cl_Pos2D_double Center_k;
        public cl_Pos2D_double Center_k_1;
        public bool b_isMovement;

        public isMovementStruct(short Nrows, short Ncols)
        {
            tb_MovementMap_k = new bool[Nrows, Ncols];
            tb_MovementMap_k_1 = new bool[Nrows, Ncols];
            b_isMovement = false;
            MapCellMatrix_k = new aux_MapCell((ushort)Nrows, (ushort)Ncols);
            Center_k = new cl_Pos2D_double();
            Center_k_1 = new cl_Pos2D_double();

        }
    } 
}
